/*            Copyright(c) 2006-2008 Dave Sexton           *
 * http://www.codeplex.com/DocProject                      *
 * http://www.codeplex.com/DocProject/Project/License.aspx *
 ***********************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using DaveSexton.DocProject.Engine;

namespace DaveSexton.DocProject
{
	internal sealed class DocProjectHost : MarshalByRefObject, IDocProjectHost
	{
		#region Public Properties
		public IDocProject Project
		{
			get
			{
				return project;
			}
		}

		public BuildSettings Settings
		{
			get
			{
				return settings;
			}
		}

		public IBuildEngine Engine
		{
			get
			{
				return engine;
			}
		}

		public DocProjectOptions Options
		{
			get
			{
				return options;
			}
		}

		public IEnvironmentHost EnvironmentHost
		{
			get
			{
				return environmentHost;
			}
		}

		public bool RunningInVisualStudio
		{
			get
			{
				return runningInVisualStudio;
			}
		}
		#endregion

		#region Private / Protected
		private readonly IDocProject project;
		private readonly IBuildEngine engine;
		private readonly BuildSettings settings;
		private readonly DocProjectOptions options;
		private readonly IEnvironmentHost environmentHost;
		private readonly bool runningInVisualStudio;
		#endregion

		#region Constructors
		/// <summary>
		/// Constructs a new instance of the <see cref="DocProjectHost" /> class.
		/// </summary>
		public DocProjectHost(IDocProject project, IBuildEngine engine, BuildSettings settings, DocProjectOptions options, 
			IEnvironmentHost environmentHost, bool runningInVisualStudio)
		{
			this.project = project;
			this.engine = engine;
			this.settings = settings;
			this.options = options;
			this.environmentHost = environmentHost;
			this.runningInVisualStudio = runningInVisualStudio;
		}
		#endregion

		#region Methods
		[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.LinkDemand,
		 Flags = System.Security.Permissions.SecurityPermissionFlag.Infrastructure)]
		public override object InitializeLifetimeService()
		{
			return null;
		}
		#endregion
	}
}
